from redis import StrictRedis

class Config:
    DEBUG = None

    # 密钥要放在上边否则就默认没有设置
    SECRET_KEY = 'w0HX2cKlsuhyNvhzxKNotOprLI8xnLnAX1Kozx83gjaV8hKpl0gBXg=='





    SESSION_TYPE='redis'
    config_REDIS_HOST = '127.0.0.1'
    config_REDIS_PORT = 6379


    SESSION_REDIS=StrictRedis(host=config_REDIS_HOST,port=config_REDIS_PORT)
    SESSION_USE_SIGNER=True
    PERMANENT_SESSION_LIFETIME=86400

    
    SQLALCHEMY_DATABASE_URI='mysql://root:mysql@localhost/info_python37'
    SQLALCHEMY_TRACK_MODIFICATIONS=False

class Development(Config):
    DEBUG = True

class Producting(Config):
    DEBUG = False
config_dict={
    'dev':Development,
    'pro':Producting
}